package com.egrid.point.bury.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;

/**
 * BuryPoint.java
 * Created at 2019-12-26
 * Created by Royal Warmer
 * Copyright (C) 2018 SAIC VOLKSWAGEN, All rights reserved.
 */
@Data
@ApiModel("记录埋点实体类")
@Table(name = "TT_BURY_POINT")
@Entity
public class BuryPoint implements Serializable {

    @Id
    @GenericGenerator(name="idGenerator", strategy="uuid") //这个是hibernate的注解
    @GeneratedValue(generator="idGenerator")
    private String id;

    @ApiModelProperty(value = "发起的时间戳")
    private Long timestamp;

    @ApiModelProperty(value = "事件类型,page，click，ajax 三种")
    private String eventType;

    @ApiModelProperty(value = "事件内容")
    @Column(name="event_Content",length = 2000)
    private String eventContent;

    @ApiModelProperty(value = "事件目标地址")
    @Column(name = "EVENT_TARGET_URL")
    private String eventTargetURL;

    @ApiModelProperty(value = "事件目标方法 optional")
    private String eventTargetMethod;

    @ApiModelProperty(value = "事件触发地址")
    @Column(name="EVENT_REFERER_URL")
    private String eventRefererURL;

    @ApiModelProperty(value = "用户token optional")
    private String userToken;

    @ApiModelProperty(value = "应用的类型 由配置文件固定写入")
    private String appType;           
}
